﻿<navigation:Page x:Class="AppLab.Views.TerminalInfos"         
           xmlns:local="clr-namespace:AppLab"
           xmlns:control="clr-namespace:AppLab.Controls"
           xmlns:web="clr-namespace:AppLab.Web"  
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="800" d:DesignHeight="800"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <local:DateTimeConverter x:Key="DateConverter" />
            <local:BooleanToVisibilityConverter x:Key="VisibleConverter"/>
        </Grid.Resources>

        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}">
            <toolkit:BusyIndicator x:Name="busyIndicatorLoad" Grid.RowSpan="2" BusyContent="{Binding Path=ApplicationStrings.BusyIndicatorLoad, Source={StaticResource ResourceWrapper}}">

                <toolkit:BusyIndicator x:Name="busyIndicator" IsBusy="{Binding}">
                    <StackPanel x:Name="ContentStackPanel" Style="{StaticResource ContentStackPanelStyle}">

                        <Grid Height="50">
                            <Image Height="35" Stretch="UniformToFill" Source="/AppLab;component/Images/dx.png" HorizontalAlignment="Left"/>

                            <TextBlock Text="{Binding Path=ApplicationStrings.SelectedMobileBrandOnTerminalInfo, Source={StaticResource ResourceWrapper}}" 
                                   VerticalAlignment="Center"  Margin="220,0,0,0" HorizontalAlignment="Left" FontSize="13" Foreground="Black"
                                   Style="{StaticResource ContentTextStyle}"/>
                            <ComboBox Name="mobileBrand" Height="23" Margin="285,0,0,0" HorizontalAlignment="Left" Width="100" SelectionChanged="mobileBrand_SelectionChanged"/>

                            <TextBlock Text="{Binding Path=ApplicationStrings.InputMobileTypeOnTerminalInfo, Source={StaticResource ResourceWrapper}}" 
                                   VerticalAlignment="Center"  Margin="420,0,0,0" HorizontalAlignment="Left" FontSize="13" Foreground="Black"
                                   Style="{StaticResource ContentTextStyle}"/>
                            <sdk:AutoCompleteBox Name="autoCompleteBoxMbBrand" Height="23" IsTextCompletionEnabled="True" HorizontalAlignment="Left" 
                                             Width="120" Margin="490,0,0,0" VerticalAlignment="Center" IsDropDownOpen="True"
                                             TabNavigation="Cycle" GotFocus="autoCompleteBoxMbBrand_GotFocus" />
                            <Button Name="SearchButton" Content="{Binding Path=ApplicationStrings.SearchButtonOnTerminalInfo, Source={StaticResource ResourceWrapper}}"
                                HorizontalAlignment="Left" Margin="610,0,0,0" 
                                Height="23" Click="SearchButton_Click" />

                            <Button Name="ShowAllMobileInfo" Content="全部终端" HorizontalAlignment="Left" Margin="660,0,0,5"  Style="{StaticResource LoginRegisterLinkStyle}" 
                                         VerticalAlignment="Bottom"  Foreground="Blue" FontSize="13"  Height="23" Click="ShowAllMobileInfo_Click" IsEnabled="True" />
                            <Image Height="15" Stretch="UniformToFill" Margin="714,0,0,10" HorizontalAlignment="Left" Source="/AppLab;component/Images/verticaline.png" VerticalAlignment="Bottom"></Image>
                            <Button Name="AddNewBrandMobile" Content="添加终端" HorizontalAlignment="Left" Margin="720,0,0,5"   Style="{StaticResource LoginRegisterLinkStyle}"
                                         VerticalAlignment="Bottom" Foreground="Blue" FontSize="13" Height="23"
                                         Click="AddNewBrandMobile_Click" />
                            <Image Height="15" Stretch="UniformToFill" Margin="774,0,0,10" HorizontalAlignment="Left" Source="/AppLab;component/Images/verticaline.png" VerticalAlignment="Bottom"></Image>
                            <Button Name="ModifyMobile" Content="修改终端" HorizontalAlignment="Left" Margin="780,0,0,5"   Style="{StaticResource LoginRegisterLinkStyle}"
                                         VerticalAlignment="Bottom" Foreground="Blue" FontSize="13" Height="23" 
                                         Click="ModifyMobile_Click" />
                            <!--<Image Height="15" Stretch="UniformToFill" Margin="834,0,0,10" HorizontalAlignment="Left" Source="/AppLab;component/Images/verticaline.png" VerticalAlignment="Bottom"></Image>
                            <Button Name="ModifyAdaptation" Content="适配状态" HorizontalAlignment="Left" Margin="840,0,0,5"   Style="{StaticResource LoginRegisterLinkStyle}"
                                         VerticalAlignment="Bottom" Foreground="Blue" FontSize="13" Height="23" 
                                         Click="ModifyAdaptation_Click" />-->
                        </Grid>

                        <Grid>
                            <sdk:DataGrid Name="dgPhoneInfo"  Height="560"  AutoGenerateColumns="False" 
                                  IsReadOnly="True" GridLinesVisibility="Vertical" HorizontalAlignment="Left" 
                                  BorderThickness="2" BorderBrush="#FFCE6A6A" ColumnWidth="100" Margin="30,0,0,0"
                                  VerticalAlignment="Top" SelectionChanged="dgPhoneInfo_SelectionChanged" MouseLeftButtonUp="dgPhoneInfo_MouseLeftButtonUp"  SelectionMode="Single" Grid.Row="0">
                                <sdk:DataGrid.Columns>
                                    <sdk:DataGridTextColumn Header="品牌" Binding="{Binding MobileBrand}" />
                                    <sdk:DataGridTextColumn Header="型号" Binding="{Binding MobileType}" />
                                    <sdk:DataGridTextColumn Header="系统" Binding="{Binding MobileOS}" />
                                    <sdk:DataGridTextColumn Header="分辨率" Binding="{Binding Resoulution}" />
                                    <sdk:DataGridTextColumn Header="屏幕尺寸" Binding="{Binding ScreenSize}" />
                                    <sdk:DataGridTextColumn Header="外型" Binding="{Binding OutwardTypeStr}" />
                                    <sdk:DataGridTextColumn Header="是否支持3G" Binding="{Binding IsOn3G}"/>
                                    <sdk:DataGridTextColumn Header="是否支持流媒体" Width="110" Binding="{Binding IsOnStreamMedia}" />
                                    <sdk:DataGridTextColumn Header="是否支持触摸" Binding="{Binding IsOnTouch}" />
                                    <sdk:DataGridTextColumn Header="上市时间" Binding="{Binding InformationTime,StringFormat=yyyy-MM-dd}" />
                                </sdk:DataGrid.Columns >
                            </sdk:DataGrid>
                        </Grid>
                        <Grid>
                            <sdk:DataPager Name="dpPhoneInfo" VerticalAlignment="Top"  HorizontalAlignment="Left" Margin="30,0,0,0" IsTotalItemCountFixed="True" 
                                       Grid.Row="1" DisplayMode="FirstLastPreviousNext" >
                            </sdk:DataPager>
                        </Grid>
                    </StackPanel>
                </toolkit:BusyIndicator>
            </toolkit:BusyIndicator>
        </ScrollViewer>
    </Grid>
</navigation:Page>
